import {HOST} from "@/api/hosts";
import {req_get_auth, req_post_auth} from "@/api/axiosFun";

export const getAllCars = (params) => {
    return req_get_auth("get", `${HOST}/cars/page`, params);
};
export const listCars = (params) => {
    return req_get_auth("get", `${HOST}/cars`, params);
};

export const addCar = (data) => {
    return req_post_auth("post", `${HOST}/cars/add`, data);
};

export const deleteCar = (carIdWbxqy) => {
    return req_post_auth("delete", `${HOST}/cars/delete/${carIdWbxqy}`);
};

export const updateCar = (data) => {
    return req_post_auth("put", `${HOST}/cars`, data);
};
